<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>DAQ_LOG: daq::Formatter Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">DAQ_LOG
   </div>
   <div id="projectbrief">logger</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>daq</b></li><li class="navelem"><a class="el" href="classdaq_1_1Formatter.html">Formatter</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classdaq_1_1Formatter-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">daq::Formatter Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdaq_1_1Formatter_1_1FormatItem.html">FormatItem</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">格式化项  <a href="classdaq_1_1Formatter_1_1FormatItem.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ae857cb199ddfdafbc9bfa3204d25d4b5"><td class="memItemLeft" align="right" valign="top"><a id="ae857cb199ddfdafbc9bfa3204d25d4b5"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>sptr</b> = std::shared_ptr&lt; <a class="el" href="classdaq_1_1Formatter.html">Formatter</a> &gt;</td></tr>
<tr class="separator:ae857cb199ddfdafbc9bfa3204d25d4b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac2ae2c7b79e090d996b1a6c8491d4cfd"><td class="memItemLeft" align="right" valign="top"><a id="ac2ae2c7b79e090d996b1a6c8491d4cfd"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdaq_1_1Formatter.html#ac2ae2c7b79e090d996b1a6c8491d4cfd">patternParser</a> ()</td></tr>
<tr class="memdesc:ac2ae2c7b79e090d996b1a6c8491d4cfd"><td class="mdescLeft">&#160;</td><td class="mdescRight">patternParser 初始化时解析格式 <br /></td></tr>
<tr class="separator:ac2ae2c7b79e090d996b1a6c8491d4cfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab060743da2f5e48c5021b10dfc3439d3"><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdaq_1_1Formatter.html#ab060743da2f5e48c5021b10dfc3439d3">format</a> (LogEvent::sptr event)</td></tr>
<tr class="memdesc:ab060743da2f5e48c5021b10dfc3439d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">format 格式化日志事件  <a href="#ab060743da2f5e48c5021b10dfc3439d3">More...</a><br /></td></tr>
<tr class="separator:ab060743da2f5e48c5021b10dfc3439d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62bedb8ff686edc0e19c1b6d9130e354"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdaq_1_1Formatter.html#a62bedb8ff686edc0e19c1b6d9130e354">Formatter</a> (const std::string &amp;pattern)</td></tr>
<tr class="memdesc:a62bedb8ff686edc0e19c1b6d9130e354"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造函数  <a href="#a62bedb8ff686edc0e19c1b6d9130e354">More...</a><br /></td></tr>
<tr class="separator:a62bedb8ff686edc0e19c1b6d9130e354"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb73224a684f226d46092536d7e20edd"><td class="memItemLeft" align="right" valign="top"><a id="aeb73224a684f226d46092536d7e20edd"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdaq_1_1Formatter.html#aeb73224a684f226d46092536d7e20edd">Formatter</a> ()=default</td></tr>
<tr class="memdesc:aeb73224a684f226d46092536d7e20edd"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造函数 <br /></td></tr>
<tr class="separator:aeb73224a684f226d46092536d7e20edd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5dd988fb194686310100a722f1bb4a92"><td class="memItemLeft" align="right" valign="top"><a id="a5dd988fb194686310100a722f1bb4a92"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdaq_1_1Formatter.html#a5dd988fb194686310100a722f1bb4a92">~Formatter</a> ()=default</td></tr>
<tr class="memdesc:a5dd988fb194686310100a722f1bb4a92"><td class="mdescLeft">&#160;</td><td class="mdescRight">析构函数 <br /></td></tr>
<tr class="separator:a5dd988fb194686310100a722f1bb4a92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab329d883433a924780a4e424c4539e99"><td class="memItemLeft" align="right" valign="top"><a id="ab329d883433a924780a4e424c4539e99"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>getPattern</b> () const</td></tr>
<tr class="separator:ab329d883433a924780a4e424c4539e99"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a03814eb9c2073df5371b896402c9a925"><td class="memItemLeft" align="right" valign="top"><a id="a03814eb9c2073df5371b896402c9a925"></a>
std::vector&lt; FormatItem::sptr &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>m_items</b></td></tr>
<tr class="separator:a03814eb9c2073df5371b896402c9a925"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a434129d1255aa29561d914b345f1e99a"><td class="memItemLeft" align="right" valign="top"><a id="a434129d1255aa29561d914b345f1e99a"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>m_pattern</b></td></tr>
<tr class="separator:a434129d1255aa29561d914b345f1e99a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a62bedb8ff686edc0e19c1b6d9130e354"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a62bedb8ff686edc0e19c1b6d9130e354">&#9670;&nbsp;</a></span>Formatter()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">daq::Formatter::Formatter </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>pattern</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>构造函数 </p>
<p>pattern 要使用的日志格式(字符串) </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ab060743da2f5e48c5021b10dfc3439d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab060743da2f5e48c5021b10dfc3439d3">&#9670;&nbsp;</a></span>format()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::string daq::Formatter::format </td>
          <td>(</td>
          <td class="paramtype">LogEvent::sptr&#160;</td>
          <td class="paramname"><em>event</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>format 格式化日志事件 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">event</td><td>日志事件</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>日志事件字符串 </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="formatter_8hpp_source.html">formatter.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
